import request from '@/utils/request'

export function addApi(params: Record<string, any>) {
  return request.post({
    url: '/activity/code_batch/add',
    method: 'post',
    params,
  })
}
export function deleteApi(params: Record<string, any>) {
  return request.post({
    url: '/activity/code_batch/delete',
    method: 'post',
    params,
  })
}
export function editApi(params: Record<string, any>) {
  return request.post({
    url: '/activity/code_batch/edit',
    method: 'post',
    params,
  })
}
export function listsApi(params: Record<string, any>) {
  return request.post({
    url: '/activity/code_batch/lists',
    method: 'post',
    params,
  })
}
export function detailApi(params: Record<string, any>) {
  return request.post({
    url: '/activity/code_batch/detail',
    method: 'post',
    params,
  })
}
export function statusApi(params: Record<string, any>) {
  return request.post({
    url: '/activity/code_batch/status',
    method: 'post',
    params,
  })
}
export function generateApi(params: Record<string, any>) {
  return request.post({
    url: '/activity/code_batch/generate',
    method: 'post',
    params,
  })
}
export function exportApi(params: Record<string, any>) {
  return request.post(
    {
      url: '/activity/code_batch/export',
      method: 'post',
      params,
      responseType: 'blob',
    },
    {
      isReturnDefaultResponse: true,
    },
  )
}
export function getFileDownloadUrlApi(Params: Record<string, any>) {
  return request.post({
    url: '/activity/code_batch/file_download_url',
    method: 'post',
    params: Params,
  })
}
